package com.ljx.Controller;

import com.ljx.Domain.Orders;
import com.ljx.Domain.R;
import com.ljx.Service.OrdersService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequestMapping("order")
public class OrdersController {
    @Autowired
    OrdersService ordersService;


    /**
     * 支付模块
     * @return
     */
    @PostMapping("submit")
    public R<String> submitOrders(@RequestBody Orders order){
        ordersService.saveOrders(order);
        return R.success("下单成功");
    }
}
